//
//  UITableViewCell+Indicator.m
//  Ifonnx
//
//  Created by bill on 2022/1/21.
//  Copyright © 2022 WWQ. All rights reserved.
//

#import "UITableViewCell+Indicator.h"

@implementation UITableViewCell (Indicator)
-(void)addCustomIndicator
{
    UIImageView *indicator = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"right_arrow"]];
    indicator.contentMode = UIViewContentModeScaleAspectFit;
    [self.contentView addSubview:indicator];
    [indicator mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_offset(-20);
        make.width.height.offset(15);
        make.centerY.mas_offset(0);
    }];
}
-(void)changeIndicatorView:(NSString*)imgName
{
    UIImage *image = [UIImage imageNamed:imgName];
    UIView *assoryView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, image.size.width, image.size.height)];
    UIImageView *img = [[UIImageView alloc]initWithImage:image];
    img.frame = assoryView.bounds;
    [assoryView addSubview:img];
    self.accessoryView = assoryView;
}
-(void)removeIndicatorView
{
    self.accessoryView = [UIView new];
}
@end
